package com.dragon.dragonshop.controller.user;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/user/info")
public class UserInfoController {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @GetMapping("/userinfo")
    public String showUserInfo(HttpSession session){
        Object user = session.getAttribute("user");
        logger.info("展示了用户的数据");
        return "user";
    }
}
